package com.lg.erp.controller.zhangchaofu;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lg.erp.entity.JsonResult;
import com.lg.erp.entity.zhangchaofu.CTIomWarehouse;
import com.lg.erp.service.zhangchaofu.ICTIomWarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CTIomWarehouseController {

    @Autowired
    private ICTIomWarehouseService iomWarehouseService;

    @GetMapping("/iomWarehousesByIomNo")
    public JsonResult getIomByIomNo(String iomNo){
        List<CTIomWarehouse> list = iomWarehouseService.list(new QueryWrapper<CTIomWarehouse>().lambda().eq(CTIomWarehouse::getIomNo, iomNo));
        return new JsonResult(1,"ok",list);
    }

}
